<? if ($_cpn = $DATA['component']) {

	if ($t = datafetch_array('db_list', array(
		'table' => tb('data'), 
		'where' => 'id_data='.D_MB_DATA." AND id_parent=$_cpn[id]", 
		'select' => 'id', 
		'index' => 'id'
		))) {
		
		dataset('killmeta', 'id_data='.D_MB_META.' AND id_parent IN ('.implode(',', array_keys($t)).')');
	}

	dataset('db_delete', tb('data'), 'id_data IN ('.D_MB_DATA.','.D_MB_SETTINGS.") AND id_parent=$_cpn[id]");
}